package com.example.icongyou.bean;

import com.google.gson.annotations.SerializedName;

public class ChapterResource {

    @SerializedName("resourceId")
    private Integer resourceId; // 资源ID，通常由数据库自增

    @SerializedName("chapterId")
    private Integer chapterId;   // 所属章节ID

    @SerializedName("resourceType")
    private String resourceType; // 资源类型 (e.g., "video", "pdf", "link")

    @SerializedName("resourceTitle")
    private String resourceTitle; // 资源标题

    @SerializedName("resourceLink")
    private String resourceLink; // 资源链接/URL

    // 构造函数 (创建新资源时使用，ID可为空)
    public ChapterResource(Integer chapterId, String resourceType, String resourceTitle, String resourceLink) {
        this.chapterId = chapterId;
        this.resourceType = resourceType;
        this.resourceTitle = resourceTitle;
        this.resourceLink = resourceLink;
    }

    // 完整的构造函数 (从服务器获取数据时使用)
    public ChapterResource(Integer resourceId, Integer chapterId, String resourceType, String resourceTitle, String resourceLink) {
        this.resourceId = resourceId;
        this.chapterId = chapterId;
        this.resourceType = resourceType;
        this.resourceTitle = resourceTitle;
        this.resourceLink = resourceLink;
    }

    // Getters and Setters

    public Integer getResourceId() {
        return resourceId;
    }

    public void setResourceId(Integer resourceId) {
        this.resourceId = resourceId;
    }

    public Integer getChapterId() {
        return chapterId;
    }

    public void setChapterId(Integer chapterId) {
        this.chapterId = chapterId;
    }

    public String getResourceType() {
        return resourceType;
    }

    public void setResourceType(String resourceType) {
        this.resourceType = resourceType;
    }

    public String getResourceTitle() {
        return resourceTitle;
    }

    public void setResourceTitle(String resourceTitle) {
        this.resourceTitle = resourceTitle;
    }

    public String getResourceLink() {
        return resourceLink;
    }

    public void setResourceLink(String resourceLink) {
        this.resourceLink = resourceLink;
    }
}